package com.zsx.shopping.common.api.seckill.feign;

import com.zsx.shopping.common.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("shopping-seckill")
public interface SeckillFeignService {

    @PutMapping("/seckill/order/seckillStatus")
    R<Void> changeSeckillStatus(@RequestParam("userId") Long userId,
                                @RequestParam("sessionId") Long sessionId,
                                @RequestParam("skuId") Long skuId,
                                @RequestParam("status") Byte status);

    @PutMapping("/seckill/restoreStock")
    R<Void> restoreStock(@RequestParam("randomCode") String randomCode, @RequestParam("num") Integer num);
}
